package com.renchunlin.taobaounion.utils;

import com.renchunlin.taobaounion.presenter.ICategoryPagerPresenter;
import com.renchunlin.taobaounion.presenter.IHomePresenter;
import com.renchunlin.taobaounion.presenter.IOnSellPagePresenter;
import com.renchunlin.taobaounion.presenter.ISearchPresenter;
import com.renchunlin.taobaounion.presenter.ISelectedPagePresenter;
import com.renchunlin.taobaounion.presenter.ITicketPresenter;
import com.renchunlin.taobaounion.presenter.impl.SearchPresenter;
import com.renchunlin.taobaounion.presenter.impl.CategoryPagePresenterImpl;
import com.renchunlin.taobaounion.presenter.impl.HomePresenterImpl;
import com.renchunlin.taobaounion.presenter.impl.OnSellPagePresenterImpl;
import com.renchunlin.taobaounion.presenter.impl.SelectedPagePresenterImpl;
import com.renchunlin.taobaounion.presenter.impl.TicketPresenterImpl;

/*
 * class title:
 * Author by RenChunLin, Email 18957806320@163.com, Date on 2021/1/19.
 * PS: Not easy to write code, please indicate.
 */
public class PresenterManager {
    private static final PresenterManager ourInstance = new PresenterManager();
    private final ICategoryPagerPresenter mCategoryPagePresenter;
    private final IHomePresenter mHomePresenter;
    private final ITicketPresenter mTicketPresenter;
    private final ISelectedPagePresenter mSelectedPagePresenter;
    private final IOnSellPagePresenter mOnSellPagePresenter;
    private final ISearchPresenter mSearchPresenter;

    public static PresenterManager getInstance() {
        return ourInstance;
    }

    private PresenterManager() {
        mCategoryPagePresenter = new CategoryPagePresenterImpl();
        mHomePresenter = new HomePresenterImpl();
        mTicketPresenter = new TicketPresenterImpl();
        mSelectedPagePresenter = new SelectedPagePresenterImpl();
        mOnSellPagePresenter = new OnSellPagePresenterImpl();
        mSearchPresenter = new SearchPresenter();
    }

    public ICategoryPagerPresenter getCategoryPagePresenter() {
        return mCategoryPagePresenter;
    }

    public IHomePresenter getHomePresenter() {
        return mHomePresenter;
    }

    public ITicketPresenter getTicketPresenter() {
        return mTicketPresenter;
    }

    public ISelectedPagePresenter getSelectedPagePresenter() {
        return mSelectedPagePresenter;
    }

    public IOnSellPagePresenter getOnSellPagePresenter(){
        return mOnSellPagePresenter;
    }

    public ISearchPresenter getSearchPresenter() {
        return mSearchPresenter;
    }
}
